import React, {memo, useContext} from 'react'
import {ThemContext, UserContext} from "./content";

const App = memo(() => {

    const userContext = useContext(UserContext);
    const themContext = useContext(ThemContext);


    return (

        <div>
            <h2>{userContext.name}={userContext.age}</h2>
            <h2 style={{
                color: themContext.color,
                fontSize: themContext.fontSize
            }}>{userContext.name}={userContext.age}</h2>
            <h2 style={themContext}>{userContext.name}={userContext.age}</h2>
        </div>
    )
})

export default App 